import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { HttputilsService } from '../../../services/httputils.service';
@Component({
  selector: 'app-musicdetail',
  templateUrl: './musicdetail.component.html',
  styleUrls: ['./musicdetail.component.css']
})
export class MusicdetailComponent implements OnInit {
  public id: string;
  public songDetail: any | undefined;
  constructor(public router: ActivatedRoute,public http: HttputilsService) { }

  ngOnInit() {
    this.router.params.subscribe((value) => this.id = value.id);
    //  console.log(this.id);
    this.http.get('https://www.mxnzp.com/api/music/song/detail?songId=' + this.id).then((value: any) => {
      //  console.log(value);
      this.songDetail = value.data;
      console.log(this.songDetail);
    });
  }

}
